package com.panshi.vo;

import lombok.Data;

import java.io.Serializable;

@Data
public class SearchPageVO implements Serializable {

    private Integer current;

    private Integer total;

    private Integer page;

    private Integer PageAll;

    public int getPageAll(){
        if (this.getTotal() % 10 == 0) {
            return this.getTotal() / 10;
        }
        return this.getTotal() / 10 + 1;
    }

    public int getPage(){
        return (this.getCurrent() - 1) * 10;
    }
}
